package com.ray.depot.service;

import com.ray.depot.table.entity.StockChangeRecord;
import com.ray.depot.table.vo.ChangeVo;
import com.zjhc.flyhong.common.function.operator.LoginUser;
import com.zjhc.flyhong.common.function.operator.PageDto;
import com.zjhc.flyhong.common.web.Result;

public interface StockChangeRecordService {

	/**
	 * 新增
	 * @param params
	 * @param user
	 * @return
	 */
	Result<Object> addStockChangeRecord(StockChangeRecord params, LoginUser user);
	
    /**
     * 查询
     * @param id
     * @param user
     * @return
     */
	StockChangeRecord queryStockChangeRecord(String id, LoginUser user);
	
    /**
     * 修改
     * @param params
     * @param user
     * @return
     */
	Result<Object> updateStockChangeRecord(StockChangeRecord params, LoginUser user);
	
    /**
     * 删除
     * @param id
     * @param user
     * @return
     */
	Result<Object> deleteStockChangeRecord(String id, LoginUser user);
	
   /**
    * 查询
    * @param params
    * @param page
    * @param user
    * @return
    */
	PageDto<StockChangeRecord> queryStockChangeRecord(StockChangeRecord params, PageDto<StockChangeRecord> page, LoginUser user);
    /**
     * 创建调仓
     * @param record
     * @param user
     * @return
     */
    Result<Object> saveChangeRecord(ChangeVo record,Boolean isDaft, LoginUser user);
   
    /**
     * 修改收货单
     * @param record
     * @param user
     * @return
     */
     Result<Object> editChangeRecord(ChangeVo record, LoginUser user);
     /**
      * 提交审核
      * @param inOutNo
      * @param deployId
      * @param defId
      * @param actKey
      * @param user
      * @return
      */
 	Result<Object> applyRecord(String recordNo,String userids, String deployId, String defId, String actKey, LoginUser user);
     /**
      * 调仓操作
      * @param id
      * @param user
      * @return
      */
 	Result<Object> changeIn(String id, LoginUser user);
    /**
     * 删除入库数据
     * @param id
     * @param user
     * @return
     */
	Result<Object> deleteChangeRecord(String id, LoginUser user);
	/**
	 * 通过调仓单号查询
	 * @param StockChangeNo
	 * @param user
	 * @return
	 */
   StockChangeRecord queryStockChangeRecordByStockChangeNo(String StockChangeNo, LoginUser user);
   
	/**
	 * 审批不同意
	 * @param StockChangeNo
	 */
	void applyFail(String StockChangeNo);
	
	/**
	 * 审批失败
	 * @param StockChangeNo
	 */
	void applySuccess(String StockChangeNo);
	/**
	 * 审批中状态
	 * @param StockChangeNo
	 */
	void applyIng(String StockChangeNo);
	/**
	 * 审批中状态
	 * @param StockChangeNo
	 */
	void applyCancel(String StockChangeNo);
   
}
